
import { save, get } from '../utils/storage';
const key = '__TOKEN__'

let TOKEN = ''

export const setToken = function(token) {
  save(key, token)
  TOKEN = token
}

export const getToken = function() {
  if (!TOKEN) {
    TOKEN = get(key) || ''
  }
  return TOKEN
}
